// CmdMsg.cpp : Implementation of CCmdMsg
#include "stdafx.h"
#include "GPSApplication.h"
#include "CmdMsg.h"

/////////////////////////////////////////////////////////////////////////////
// CCmdMsg


STDMETHODIMP CCmdMsg::get_TargetHwnd(long *pVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	*pVal = cmdmsg.hwnd;
	return S_OK;
}

STDMETHODIMP CCmdMsg::put_TargetHwnd(long newVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	cmdmsg.hwnd = newVal;
	return S_OK;
}

STDMETHODIMP CCmdMsg::get_Message(long *pVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	*pVal = cmdmsg.msg;
	return S_OK;
}

STDMETHODIMP CCmdMsg::put_Message(long newVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	cmdmsg.msg = (_gps_message)newVal;
	return S_OK;
}

STDMETHODIMP CCmdMsg::get_wparam(long *pVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	*pVal = cmdmsg.wparam;
	return S_OK;
}

STDMETHODIMP CCmdMsg::put_wparam(long newVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	cmdmsg.wparam = newVal;
	return S_OK;
}

STDMETHODIMP CCmdMsg::get_lparam(long *pVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	*pVal = cmdmsg.lparam;
	return S_OK;
}

STDMETHODIMP CCmdMsg::put_lparam(long newVal)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	cmdmsg.lparam = newVal;
	return S_OK;
}

STDMETHODIMP CCmdMsg::Reset()
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState())

	// TODO: Add your implementation code here
	memset(&cmdmsg,0,sizeof(cmdmsg));

	return S_OK;
}
